﻿@model FollowPeers.Models.Message

@{
    ViewBag.Title = "New Conversation";
    FollowPeers.Models.FollowPeersDBEntities followPeersDB = new FollowPeers.Models.FollowPeersDBEntities();
    string name = Membership.GetUser().UserName;
    FollowPeers.Models.UserProfile myprofile = followPeersDB.UserProfiles.SingleOrDefault(p => p.UserName == name);
}

@Html.Partial("_Header")

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
        <script src=@Url.Content("~/Scripts/jquery.bgiframe.js") type="text/javascript"></script>
        <script src=@Url.Content("~/Scripts/jquery.mcdropdown.js") type="text/javascript"></script>
        <link rel="stylesheet" type="text/css" href="../../Content/css/jquery.mcdropdown.css" />

@Html.Partial("_MessageSideBar")
<div class="grid_9">
    <div class="box">
        <h2 style="height: 20px">View Message</h2>
            <fieldset>
                @{
                    
                    if (false)
                    {
                       <p>You have not followed anyone & no body is following you. Please follow someone to send them a message.</p>
                    }
                    else
                    {   <legend>Re: @Html.DisplayFor(m => Model.Subject)</legend>
                        <table>
                            <tr>
                                <td>
                                    <img src="../../Content/TempImages/default.jpg" style="width:5%; height:24px; padding:5px 2px 5px 2px; display:inline-block; float:left;"/>
                                    <div style="color:Gray;padding:5px 0px 0px 5px;font-size: 1.1em; font-weight: bold;">  @Html.DisplayFor(m => Model.Sender)</div>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <div style="padding:5px 0px 5px 5px;font-size: 0.9em; font-weight: normal; border:0 none black;">@Html.DisplayFor(m => Model.MessageBody)</div>
                                </td>
                            </tr>
                        </table>
                        
                       
                    }
                }
                
            </fieldset>
        <h5>
            @Html.ActionLink("Reply", "Reply", new { Sender = Model.Reciever, Receiver = Model.Sender, Subject = Model.Subject })
        </h5>
            @*
            @using (Html.BeginForm("Reply", "Message")){
                 @Html.ValidationSummary(true)
                        <input type="hidden" name="Sender" value="@Model.Reciever" />
                        <input type="hidden" name="Receiver" value="@Model.Sender" />
                        <input type="hidden" name="Subject" value="@Model.Subject" />
                        <fieldset>
                            <legend>@Html.LabelFor(m => Model.MessageBody, "Reply")</legend>
                            <div class="editor-field">
                                @Html.TextAreaFor(m => Model.MessageBody)
                            </div>
                            <input type="submit" value="Send" />
                        </fieldset>
            }
            *@

        <div>
            <h4>
            @Html.ActionLink("Back to Inbox", "Index")
            </h4>
        </div>
    </div>
</div>
@Html.Partial("_Footer")